#ifndef __ABSTRACTFACTORY__
#define __ABSTRACTFACTORY__

#include "Product.h"

class AbstractFactory
{
	public:
		AbstractFactory() {};
		virtual ~AbstractFactory() {};

		virtual ProductA* CreateProductA() = 0;
		virtual ProductB* CreateProductB() = 0;
		//virtual int DestroyProduct(void* p);
		virtual int DestroyProductA(ProductA* p);
		virtual int DestroyProductB(ProductB* p);
};

class Factory1 : public AbstractFactory
{
	public:
		Factory1() {};
		virtual ~Factory1() {};

		virtual ProductA* CreateProductA();
		virtual ProductB* CreateProductB();
};

class Factory2 : public AbstractFactory
{
	public:
		Factory2() {};
		virtual ~Factory2() {};

		virtual ProductA* CreateProductA();
		virtual ProductB* CreateProductB();
};

#endif
